package com.boot.mapper;

import com.boot.pojo.CompensateRecords;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.data.domain.Page;

import java.util.List;

/**
* @author liyan
* @description 针对表【compensaterecords】的数据库操作Mapper
* @createDate 2025-05-08 10:19:33
* @Entity com.boot.pojo.Compensaterecords
 *
*/

@Mapper
public interface CompensateRecordsMapper extends BaseMapper<CompensateRecords> {
    @Select("select * from compensaterecords where status = 0 order by  create_time desc limit #{pageSize} offset #{offset}")
    List<CompensateRecords> selectMyPage(@Param("pageSize") Integer pageSize, @Param("offset") Integer offset);

    @Update("update compensaterecords set status = #{status} where id = #{id}")
    int updateStatus(int id, int status);
}




